﻿<local:PageBase x:Class="MicroBlogClient.Pages.Search"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:controls="clr-namespace:Rabbit.Controls;assembly=Rabbit.Controls"
        xmlns:local="clr-namespace:MicroBlogClient"
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="300"
	Title="Search">
    <local:PageBase.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary  Source="/Resources/StatusTemplate.xaml"/>
                <ResourceDictionary  Source="/Resources/UserTemplate.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </local:PageBase.Resources>
        <Border Style="{DynamicResource MainContentBackground}">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="37"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid Grid.Row="0" Height="25">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="40"/>
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="#cecece" Background="White" CornerRadius="5" Margin="10,0,0,0">
                        <Border.Effect>
                            <DropShadowEffect ShadowDepth="0.1" Color="#737373" />
                        </Border.Effect>
                        <Canvas>
                            <TextBox x:Name="txtSearchKeyword"  Canvas.Left="0"  KeyUp="txtSearchKeyword_KeyUp"  Width="180" Background="{x:Null}" MinWidth="185" BorderBrush="{x:Null}" Padding="10,5,0,2"   BorderThickness="0" />
                            <Menu Canvas.Right="0" BorderThickness="0"/>
                            <ComboBox  Canvas.Right="0" Style="{DynamicResource SimpleComboBox}"  Margin="0,0,5,0"   SelectedIndex="0" x:Name="cmbSearchType">
                                <ComboBoxItem x:Name="cmItemStatus" Background="White" Content="搜微博"/>
                                <ComboBoxItem x:Name="cmItemUser" Background="White"  Content="搜   人"/>
                            </ComboBox>
                        </Canvas>
                    </Border>
                    <Button Grid.Column="2"   Background="{x:Null}"  BorderThickness="0" x:Name="btnSearch" Click="btnSearch_Click"  Height="30" Width="30"  VerticalAlignment="Center">
                        <controls:ImageEx Source="{DynamicResource SearchButton}"/>
                    </Button>
                </Grid>
            <ListBox   Grid.Row="1" 
                       x:Name="lstSearchResult" 
                       ItemTemplate="{StaticResource ResourceKey=StatusItemTemplate}" />
            <local:UCPager x:Name="pager"  Grid.Row="2" OnFirstPageClick="pager_OnFirstPageClick"
                           OnPreviousePage="pager_OnPreviousePage"
                           OnNextPageClick="pager_OnNextPageClick"/> 
            </Grid>
        </Border>
</local:PageBase>
